import React from 'react'
import { Upload, Button } from 'antd'
import { UploadRequestOption } from 'rc-upload/lib/interface'

export const MyUpload = () => {
	const customRequest = (options: UploadRequestOption) => {
		console.log(options.file)
		console.log('开始自定义上传')
	}
	return (
		<div>
			<Upload customRequest={(options) => customRequest(options)}>
				<Button type="primary">上传文件</Button>
			</Upload>
		</div>
	)
}
